package org.shj.pattern.chainresponsibility;

public class HandlerC extends Handler{

	@Override
	public void handleRequest(int request) {
		if(request >= 20 && request < 30){
			System.out.println("HandlerC process request.");
		}else{
			if(successor != null){
				successor.handleRequest(request); //自己不能处理，转到下一个
			}else{
				System.out.println("Cannot process request.");
			}
			
		}
		
	}

}
